<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>NaN - 非数字值-2</title>
</head>

<body>
    <!-- 除以0是无穷大，无穷大是一个数字: -->
    <p id="demo"></p>
    <script>
        var y = 1000 / 0;
        document.getElementById("demo").innerHTML = isNaN(y);  // 返回 false
    </script>
</body>

</html>